{% extends "html5.html" %}

{% block title %}Bash One-Liners :: {% block pagetitle %}{% endblock %}{% endblock %}

{% block navbar %}

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
	<div class="container">
	    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
	    </a>

	    <a class="brand" href="/">Bash One-Liners</a>

	    <div class="nav-collapse">
		<ul class="nav">
		    {% if user.is_superuser %}
		    <li><a href="/admin/">Admin</a></li>
		    {% endif %}
		    {% if user.is_authenticated %}
		    <li><a href="{% url oneliners.views.oneliner_new %}">Post</a>
		    {% endif %}
		    <li><a href="{% url oneliners.views.oneliner_list %}">One-Liners</a></li>
		    <li><a href="{% url oneliners.views.question_list %}">Questions</a></li>
		    <li><a href="{% url oneliners.views.feeds %}">Feeds</a></li>
		    <li><a href="{% url oneliners.views.sourcecode %}">Source code</a></li>
		</ul>

		{% if searchform %}
		<form class="navbar-search pull-left" method="get" action="{% url oneliners.views.search %}">
		    <input name="query" maxlength="100" placeholder="Search" type="text" class="search-query" id="id_query" />
		</form>
		{% endif %}

		{% if user.is_authenticated %}
		<p class="navbar-text pull-right">Logged in as <a href="{% url oneliners.views.profile %}">{{ user.hackerprofile.get_display_name }}</a>&mdash;<a href="{% url oneliners.views.logout %}">Logout</a></p>
		{% else %}
		<p class="navbar-text pull-right"><a href="{% url oneliners.views.login %}">Login</a></p>
		{% endif %}
	    </div>
	</div>
    </div>
</div>

{% endblock %}

{% block main %}

<div class="page-header"><h1>{% block pageheader %}{% endblock %}</h1></div>

{% block content %}{% endblock %}

{% endblock main %}

{% block footer %}
    <div class="container-fluid">
	<p class="pull-right validators"> 
	    <a href="http://wiki.dreamhost.com/index.php/DHSOTM#2012_Winners"><img alt="DreamHost Site of the Month for March!" src="/media/images/dhsotm2.gif" /></a> 
	    <a href="http://www.dreamhost.com/r.cgi?455568"><img alt="This site hosted by DreamHost. Unlimited storage and bandwidth for only $8.95" src="/media/images/dreamhost.gif" /></a> 
	    <a href="http://www.dreamhost.com/donate.cgi?id=15533"><img border="0" alt="Donate towards my web hosting bill!" src="/media/images/hosting.gif" /></a>
	    <a href="http://www.dreamhost.com/green.cgi"><img alt="Green Web Hosting! This site hosted by DreamHost." src="/media/images/green1.gif" height="31" /></a> 
	    <a href="http://validator.w3.org/check?uri=referer"><img src="/media/images/valid-xhtml10.png" alt="Valid HTML5" /></a> 
	</p> 
    </div>
{% endblock %}
